import {
    Request
} from "../utils/request";

export const orderApi = {
    getListByGroup: (data) => Request.get('/order/listByGroup', data),
    getListByShop: (data) => Request.get('/order/listByShop', data),
    getOrderById: (data) => Request.get(`/order/list/${data}`),
    getAllList: () => Request.get('/order/list'),
    allocGroup: (data) => Request.post('/order/allocGroup', data),
    allocGroupUsers: (data) => Request.post('/order/allocGroupUsers', data),
	createOrder: (data) => Request.post('/order/create', data),
    // acceptOrder: (orderId, userId, data) => Request.put(`/order/orderGroupUser/${orderId}/${userId}`, data),
    unloadOrder: (data) => Request.post('/order/createUnload', data),
    listOrderUnload: (orderId) => Request.get('/order/listOrderUnload', {'orderId': orderId}),
    updateOrderStatus: (order, status) => Request.put(`/order/status/${id}?status=${status}`),
    updateUserAllocatedInfo: (orderId, userId, data) => Request.put(`/order/orderGroupUser/${orderId}/${userId}`, data),
}